package com.bwie.doctor.controller;

import com.bwie.common.core.domain.Result;
import com.bwie.doctor.domain.po.Symptom;
import com.bwie.doctor.domain.vo.MedDoctorVo;
import com.bwie.doctor.service.MedDoctorReviewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping
@RestController
@CrossOrigin
public class MedDoctorReviewsControllerLHC {
    @Autowired
    private MedDoctorReviewsService medDoctorReviewsService;
    /**
     * 患者对医生评价列表
     * @return
     */
    @GetMapping
    public Result queryReviewsList() {
        return medDoctorReviewsService.queryReviewsList();
    }

    /**
     * 回复评论
     */
    @GetMapping("/replyReviews/{reviewId}/{reviewText}")
    public Result replyReviews(@PathVariable Long reviewId, @PathVariable String reviewText){
        return medDoctorReviewsService.queryReviewsDetails(reviewId,reviewText);
    }

    /**
     * 医生列表
     * @param symptomName
     * @return
     */
    @GetMapping("/queryDoctorList/{symptomName}")
    public List<MedDoctorVo> queryDoctorList(@PathVariable  String symptomName){
        return medDoctorReviewsService.queryDoctorList(symptomName);
    }

    /**
     * 根据部位id查询症状列表
     * @return
     */
    @GetMapping("/querySymptomList/{partId}")
    public List<Symptom> querySymptomList(@PathVariable Long partId){
        return medDoctorReviewsService.querySymptomList(partId);
    }

}
